package com.chenwang.measure.model.bean;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * @松 on 2019/8/27 14:34
 * 自定义测量段数据类
 */

public class CustomBean implements Parcelable  {
    private String startName; //  开始点名称
    private String endName;   //  结束点名称
    private String distance;  //  距离
    private String userId;    //  用户名
    private String creatorDate; // 创建日期
    private boolean select;     //是否选中
    private int state; //0新建  1 待上传  2完成
    private String startPoint;  // 开始点
    private String endPoint;    // 结束点
    private String multipoint;  // 连续点

    protected CustomBean(Parcel in) {
        startName = in.readString();
        endName = in.readString();
        distance = in.readString();
        userId = in.readString();
        creatorDate = in.readString();
        select = in.readByte() != 0;
        state = in.readInt();
        startPoint = in.readString();
        endPoint = in.readString();
        multipoint = in.readString();
    }

    public static final Creator<CustomBean> CREATOR = new Creator<CustomBean>() {
        @Override
        public CustomBean createFromParcel(Parcel in) {
            return new CustomBean(in);
        }

        @Override
        public CustomBean[] newArray(int size) {
            return new CustomBean[size];
        }
    };

    public boolean isSelect() {
        return select;
    }

    public void setSelect(boolean select) {
        this.select = select;

    }

    public int getState() {
        return state;
    }

    public void setState(int state) {
        this.state = state;
    }


    public CustomBean(String startName, String endName, String userId, String creatorDate) {
        this.startName = startName;
        this.endName = endName;
        this.userId = userId;
        this.creatorDate = creatorDate;
    }







    public CustomBean() {

    }

    public String getStartName() {
        return startName;
    }

    public void setStartName(String startName) {
        this.startName = startName;
    }

    public String getEndName() {
        return endName;
    }

    public void setEndName(String endName) {
        this.endName = endName;
    }

    public String getDistance() {
        return distance;
    }

    public void setDistance(String distance) {
        this.distance = distance;
    }

    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    public String getCreatorDate() {
        return creatorDate;
    }

    public void setCreatorDate(String creatorDate) {
        this.creatorDate = creatorDate;
    }

    public String getStartPoint() {
        return startPoint;
    }

    public void setStartPoint(String startPoint) {
        this.startPoint = startPoint;
    }

    public String getEndPoint() {
        return endPoint;
    }

    public void setEndPoint(String endPoint) {
        this.endPoint = endPoint;
    }

    public String getMultipoint() {
        return multipoint;
    }

    public void setMultipoint(String multipoint) {
        this.multipoint = multipoint;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {

        dest.writeString(startName);
        dest.writeString(endName);
        dest.writeString(distance);
        dest.writeString(userId);
        dest.writeString(creatorDate);
        dest.writeByte((byte) (select ? 1 : 0));
        dest.writeInt(state);
        dest.writeString(startPoint);
        dest.writeString(endPoint);
        dest.writeString(multipoint);
    }


}
